forum

home / developersection / forums / how to manually check if model is valid or not

How to manually check if model is valid or not

Anonymous User 1576 29-Apr-2018

I want to check the data is valid or not

 public ActionResult ValidCheck(student model)

    {

        Models.ViewModel.User model = new Models.ViewModel.User();
        model.Age = 12;
        model.Name = "Andy He";
        model.Email = "123";
        //TryValidateModel(model);
     }

could you help me?


Updated on 18-Jun-2023

I am a content writter !


Message
Can you answer this question?

Answer

2 Answers

Liked By